<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>消息测试</title>
<link rel="stylesheet" type="text/css" href="resources/css/comm.css">
</head>
<body>
<div>
	<a href="index.html">返回</a>
	<hr>
	<div id="commonPanel"></div>
	<hr>
	<div>
		<p>发送消息</p>
		<p>系统编码：<input type="text" id="sysNo" value="test"></p>
		<p>分组编码：<input type="text" id="groupId" value="sys"></p>
		<p>消息类型：<input type="text" id="type" value="10"> 类型[10阅读、20待办]</p>
		<p>消息标题：<input type="text" id="title" value="这是一个消息"></p>
		<p>消息内容：<input type="text" id="content" value="这是消息的内容"></p>
		<p>扩展1：<input type="text" id="ext1" value="扩展1"></p>
		<p>扩展2：<input type="text" id="ext2" value="扩展2"></p>
		<p>扩展3：<input type="text" id="ext3" value="扩展3"></p>
		<p>发送用户：<input type="text" id="sendUserId" value="1"></p>
		<p>接收用户：<input type="text" id="receUserIds" value="111111;222222">  [多个用;分隔]</p>
		<p>接收内容：<input type="text" id="receContent" value="测试内容">  接收短信或邮件的内容[不传默认为content内容]</p>
		<p>邮件附件：<input type="text" id="receEmailFiles" value="">  [{"name":"复制sql.txt","path":"C:\\Users\\yuejing\\Desktop\\复制sql.txt"}]</p>
		<p>接收手机：<input type="text" id="recePhones" value="13756876543;13897641025">  [多个用;分隔]</p>
		<p>接收邮箱：<input type="text" id="receEmails" value="test1@qq.com;test2@qq.com">  [多个用;分隔]</p>
		<p>
			<input type="button" id="save" value="提交">
			<span id="msg" style="color: green;font-size: 12px;"></span>
		</p>
	</div>
</div>
<script type="text/javascript" src="resources/js/jquery.min.js"></script>
<script type="text/javascript" src="resources/js/md5.js"></script>
<script type="text/javascript" src="resources/js/msg.js"></script>
<script type="text/javascript">
$(function() {
	$('#save').click(function() {
		var sysNo = $('#sysNo').val();
		var groupId = $('#groupId').val();
		var type = $('#type').val();
		var title = $('#title').val();
		var content = $('#content').val();
		var ext1 = $('#ext1').val();
		var ext2 = $('#ext2').val();
		var ext3 = $('#ext3').val();
		var sendUserId = $('#sendUserId').val();
		var receUserIds = $('#receUserIds').val();
		var receContent = $('#receContent').val();
		var receEmailFiles = $('#receEmailFiles').val();
		var recePhones = $('#recePhones').val();
		var receEmails = $('#receEmails').val();
		api.msgInfo.save(sysNo, groupId, type, title, content,
				ext1, ext2, ext3, sendUserId, receUserIds,
				receContent, receEmailFiles, recePhones, receEmails, function(json) {
			if(json.code == 0) {
				$('#msg').html('发送消息成功');
			} else {
				alert(json.message);
			}
		});
	});
});
</script>
</body>
</html>